The invention relates to emulation of a disconnect of a device (node) in a plug-and-play communication system.
The Universal Serial Bus (USB) is a host-centric plug-and-play bus. The logical USB bus connects USB devices with the USB host, using a physical tiered star topology. The system has one host with a hub at the center of each star. Hubs convert a single attachment point (port) into multiple attachment points. The upstream port of a hub connects the hub towards the host. Each of the downstream ports of a hub allows connection to another hub or a function. Hubs can detect attach and detach at each downstream port. Each wire segment is a point-to-point connection between the host and a hub or function, or a hub connected to another hub or function. A function is a USB device that is able to transmit or receive data or control information over the bus and as such provides capabilities to the system. Examples of functions include locator devices, such as a mouse, tablet, or light pen, input devices, such as a keyboard or a scanner, output devices, such as a printer or digital speakers, and a telephony adapter. Each function contains configuration information that describes its capabilities and resource requirements. Before a function can be used, the host must configure it. This configuration includes allocating USB bandwidth and selecting function-specific configuration options.
The USB transfers signals over two wires indicated by D+ and Dxe2x88x92 on each point-to-point segment. The USB core specification 1.0, 1.1 defines a Low-Speed and a Full-Speed mode, operating at a respective bitrate of 1.5 Mb/s and 12 Mb/s. In order to provide guaranteed input voltage levels and proper termination impedance, biased terminations are used at each end of the cable. The terminations also permit the detection of attach and detach at each port and differentiate between full-speed and low-speed devices by the position of the pull-up resistor on the downstream end of the cable:
Full-speed (FS) devices are terminated with the pull-up resistor on the D+ line;
Low-speed (LS) devices are terminated with the pull-up resistor on the Dxe2x88x92 line.
USB devices may attach to and detach from the USB at any time. Consequently, system software must accommodate dynamic changes in the physical bus topology. Bus enumeration is the activity that identifies and assigns unique addresses to devices attached to a bus. Bus enumeration also includes the detection and processing of removals. Hubs have status indicators that indicate the attachment or removal of a USB device on one of its ports. The host queries the hub to retrieve these indicators in the case of an attachment, the host enables the port and addresses the USB device through the device""s control pipe at the default address. The host assigns a unique USB address to the device and then determines if the newly attached USB device is a hub or a function. If the attached USB device is a hub and USB devices are attached to its ports, then the above procedure is followed for each of the attached USB devices. If the attached USB device is a function, then attachment notifications will be handled by host software that is appropriate for the function.
The signaling of a connect and disconnect of a function, is as follows. When no function is attached to the downstream port of the host or hub, the pull-down resistors present there will cause both D+ and Dxe2x88x92 to be pulled below the single-ended low threshold of the host or hub port when that port is not being driven by the hub. The detection of a new connect or a disconnect is done by checking the D+ and Dxe2x88x92 state for both FS and LS device. When there is no connect, the receiver of the hub""s downstream-facing port sees single-ended zero SE0 (i.e. D+=Dxe2x88x92 less than threshold, i.e. logic 0). When an FS device is connected, the receiver sees a transition of D+ from logic 0 to logic 1, while Dxe2x88x92 remains at logic 0. The corresponding idle state of the bus is D+=1 and Dxe2x88x92=0. In a similar way, when a LS device is connected, the receiver sees a transition of Dxe2x88x92 from logic 0 to logic 1, while D+ remains at logic 0. The corresponding idle state of the bus is Dxe2x88x92=1 and D+=0. In case of a disconnect, the receiver of the hub""s downstream-facing port (where the device was connected) sees a bus state transition from (D+,Dxe2x88x92)=(1,0) for an FS device and (D+,Dxe2x88x92)=(0,1) for an LS device to (D+,Dxe2x88x92)=(0,0) for both an HS and LS device. A disconnect condition (TDDIS) is indicated if the host or hub is not driving the data lines and an SE0 persists on a downstream port for more than 2.5 s. A connect condition (TDCNN) will be detected when the hub detects that one of the data lines is pulled above its VIH threshold for more than 2.5 s.
As described above, the host initiates the enumeration process. The USB specifications do not define a way by which a device can request the host to reset and re-enumerate the device. However in some applications this re-enumeration is needed, for example due to the change of the functionality of the device. The most straightforward way to achieve this re-enumeration is by first disconnecting the device, and then connecting it back again to the hub""s downstream-facing port. However, for some applications, it is desired or even needed to be able to emulate this disconnect-then-connect-again process through device""s firmware control, instead of through manual intervention. The emulation can be done by electronically switching the pull-up resistor that is attached to the D+ line (for a FS device) or Dxe2x88x92 line (for a LS device) first off (i.e. disabling the termination), followed by switching it on.
The USB 2.0 specification defines a High-Speed (HS) device operating at around 480 Mb/s. The HS device is in addition to the low-speed and full-speed devices. For a HS device, the termination for normal operation is changed from single data line pull-up to a parallel termination. When a HS device is connected to a hub""s downstream-facing port, the device always has its D+ pull-up resistor on, just as an FS device, and the detection of a new connect is done in the same way as for a FS device. The hub will reset this new device, and the device will switch to parallel termination after having gone through a predefined xe2x80x98chirpingxe2x80x99 process during the reset period. In normal HS operation, the parallel termination is used, and the corresponding idle state is SE0. There is thus no distinction between the idle state and the disconnect state, both being at SE0. The following mechanism is defined for HS device disconnect detection: if the device is disconnected, then a constant signal transmitted by the hub""s transmitter to the device will be reflected back, and the hub""s receiver will see a differential signal amplitude exceeding the maximum allowable data signal level after a delay of a round-trip time of the cable. This excess signal level is used to reliably detect disconnect.
It is an object of the invention to emulate a disconnect of the device at the same downstream-facing port, where the emulation can be performed in a firmware controlled way, without manual intervention.
To meet the object of the invention, the plug-and-play communication system, includes a device connected via a wire segment to a further device/hub; the system supporting communication in at least a first speed mode (FS) and a second, higher speed mode (HS); the device including for each respective one of the speed modes a respective first and second means of terminating the wire segment; the device being operative to emulate disconnecting the device, while operating in the second speed mode, by activating the first means of terminating the wire segment. By activating the first means of termination, possibly in addition to the existing second means of termination, the termination for communication within the second mode no longer complies with the requirements. The deviation can be detected by the further device or hub connected to the other end of the segment. By using the first means of termination, which is any how present in the dual-mode device, the deviation in the termination is achieved in a simple way. With the phrase xe2x80x98further device/hubxe2x80x99 is meant the node connected at the other end of the segment. In USB, this node is called a hub. In other systems, such a node may functionally be the same as a device.
As defined in the measure of the dependent claim 2, preferably the device (or hub) at the other end of the segment detects that the termination exceeds the limit for the second mode communication, and starts a reconnect process to determine whether a new or the same device has been connected and at which speed the device can operate.
As defined in the measure of the dependent claim 3, the second mode termination is disabled, bringing the termination of the device into the limits for the first speed mode, allowing a well-defined and good starting point for the reconnect process.
As defined in the measure of the dependent claim 4, like for a USB FS device the termination for the first speed mode (FS) is an impedance, such as pull-up resistor coupled between one the data wires and a supply voltage. A controllable switch is preferably used to enable/disable the coupling of the resistor. Including the D+ pull-up is practically equivalent to an open end, allowing for a reliably detection of a disconnect.
As defined in the measure of the dependent claim 6, like for a USB HS device the termination for the second speed mode (HS) is obtained by having the FS driver generate a SE0 signal via two matching resistors. Disabling the termination can be achieved by disabling the driver.
The object of the invention is achieved by providing a device for use in a plug-and-play communication system, where the device is connectable via a wire segment to a further device/hub; the system supporting communication in at least a first speed mode and a second, higher speed mode; the device including for each respective one of the speed modes a respective first and second means of terminating the wire segment; the device being operative to emulate disconnecting the device, while operating in the second speed mode, by activating the first means of terminating the wire segment.
The object of the invention is also achieved by providing a method of emulating disconnecting a device in a plug-and-play communication system, where the device is connected via a wire segment to a further device/hub; the system supporting communication in at least a first speed mode and a second, higher speed mode; the device including for each respective one of the speed modes a respective first and second means of terminating the wire segment; the method including emulating disconnecting the device, while operating in the second speed mode, by activating the first means of terminating the wire segment.